1. Field
The present invention relates to a method, system, and an article of manufacture for reserving memory.
2. Description of the Related Art
In many computational devices, the storage capacity of secondary storage, such as, disk storage, may be larger than the storage capacity of main memory, such as, random access memory. In certain implementations, a virtual memory manager may implement a virtual memory, such that, the addressable storage space available to an application in a computational device is not limited by the storage capacity of the main memory in the computational device. The virtual memory manager may implement the virtual memory by using the secondary storage to simulate additional main memory.
In implementations of virtual memory, the virtual memory manager may swap data and instructions from the main memory to the secondary storage in order to accommodate data and instructions that need to be stored in the main memory. In certain implementations, data and instructions may be stored in data structures referred to as pages, and the virtual memory manager may swap pages from the main memory to the secondary storage as required.
Operating systems may allow a certain amount of memory to be reserved in the main memory, such that, the reserved memory is not swapped from the main memory to the secondary storage. Certain types of reserved memory may be referred to as pinned memory or hidden memory. Instructions and data stored in the main memory may be accessed faster than instructions and data stored in the secondary storage. In certain implementations, such as, implementations involving real-time applications, such reservation of memory may be needed for real-time execution of instructions. In certain implementations, such real time applications may execute in an Enterprise Storage Server* (ESS) system. In certain implementations, other applications besides real-time applications may also reserve part of the main memory. *AIX, Enterprise Storage Server (ESS) are trademarks of International Business Machines Corp.
Certain operating systems may place an upper limit on the total amount of main memory that may be reserved. For example, in many versions of the UNIX* operating system, such as, the AIX* operating system, the total amount of main memory that may be reserved may not exceed 80% of the total main memory. *UNIX is a trademark of the Open Group.